import React, { useEffect, useState } from 'react';
import styles from './index.less';
import List from './List/index'
import { getOList } from '@/servers/getOList'
import { CartProductType } from '@/models/types'
import { WhiteSpace, WingBlank } from 'antd-mobile';
export default function OList() {
  const [data, setdata] = useState<CartProductType[]>([])
  useEffect(() => {
    getOList().then(data => setdata(data.list.data))
  }, [])
  return (
    <WingBlank size='lg'>
      <WhiteSpace size='lg'></WhiteSpace>
      <List data={data}></List>
    </WingBlank>
  );
}
